<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>
		</title>
		<link rel="stylesheet" type="text/css" href="<?php echo __PUBLIC__?>/Home/css/common_header.css"/>
		<link rel="stylesheet" type="text/css" href="<?php echo __PUBLIC__?>/Home/css/common_bottom.css"/>
		<link rel="stylesheet" type="text/css" href="<?php echo __PUBLIC__?>/Home/css/CheckOrder.css"/>
		<script type="text/javascript" src="<?php echo __PUBLIC__?>/Home/js/jquery-1.8.2.min.js"></script>
	</head>
	<body>
		<!--顶部登陆-->
		<div class="page_top_nav_long">
			<div class="page_top_nav">
				<!--顶部左边-->
				<ul class="page_top_nav_l">
					<li class="s-hw" style="background-image: none;padding-left: 0px;">
						<a href="index.php" style="padding-left: 0px;">
							华为官网
						</a>
					</li>
				</ul>
				<!--顶部右边-->
				<ul class="page_top_nav_r">
					<?php if(isset($_SESSION['username'])){?>
                
					<!--如果有登陆，才显示-->
					<li style="display: list-item;" class="s-user hide" id="login_status">
						<div class="s-dropdown">
							<div class="h">
								<a href="<?php echo U('User/index')?>" id="customer_name" rel="nofollow" timetype="timestamp" class="link-user">
									<?php echo $_SESSION['username']?>
								</a>
								<em class="vip-state" id="vip-info">
									<a href="#" title="VMALL V0会员" id="vip-Active">
										<i class="icon-vip-level-0">
										</i>&nbsp;
									</a>
								</em>
								<s>
								</s>
							</div>
							<div class="b">
								<p>
									<a href="https://hwid1.vmall.com/oauth2/userCenter/hwAccount?reqClientType=26&amp;loginChannel=26000000&amp;themeName=cloudTheme" target="_blank" id="user-center">
										我的华为帐号
									</a>&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;
									<a href="<?php echo U('Login/out')?>">
										退出
									</a>
								</p>
							</div>
						</div>
					</li>
					<?php }else{?>
					<!--如果没有登录才会显示-->
					<li class="login">
						<a href="<?php echo U('Login/index')?>" class="login">
							登陆
						</a>
						<a href="<?php echo U('Register/index')?>" class="page_top_nav_r_a">
							注册
						</a>
					</li>
					
               <?php }?>
					<li>
						<a href="<?php echo U('User/index')?>" class="page_top_nav_r_a">
							我的订单
						</a>
					</li>
				</ul>
			</div>
		</div>
		<!--顶部登录结束-->
		<!--logo-->
		<div class="top_logo_long">
			<div class="top_logo">
				<div class="top_logo_l">
					<div class="logo_img">
						<a href="index.php">
							<img src="<?php echo __PUBLIC__?>/Home/images/newLogo.png"/>
						</a>
					</div>
				</div>
				<div class="top_logo_r">
					<div class="progress-area">
						<div class="progress-cart">
						</div>
						<div class="">
						</div>
						<div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<!--订单-->
		<div class="layout order">
			<!--收货人信息-->
			<div class="order-form-area">
				<!--复制-->
				<div class="order-address" id="order-address-mod">
					<h3 class="title">
						收货人信息
						<b>[
							<a id="addAddress" href="javascript:;" >
								使用新地址
							</a>]</b>
					</h3>
					<?php if($adData){?>
                
					<!--如果有地址-->
					<?php foreach ($adData as $k=>$v){?>
					<?php $num = time() + $k; ?>
					<div class="order-address-list" id="order-address-list">
						<ol>
							<li class=" address_radio" id="myAddress-23246360">
								<div class="address-main">
									<span class="address-mark" style="display: none;" kk="<?php echo $k?>">
										<i>
										</i>寄送至
									</span>
									<input value="<?php echo $v['adid']?>" class="radio" name="myAddress" id="input-myAddress<?php echo $num?>" type="radio" checked="checked">
									<label class="address-info" for="input-myAddress<?php echo $num?>">
										<b><?php echo $v['uname']?></b>
										<span><?php echo $v['address']?></span>
										<span>收货人：<?php echo $v['uname']?></span>
										<span>电话：<?php echo $v['phone']?></span>
									</label>
								</div>
								<div class="address-sub">
									<!-- <span class="default">默认地址</span>
									<a href="javascript:;"  class="address-del">删除</a>
									<a href="#edit"  class="address-edit"><span>修改</span></a> -->
								</div>
							</li>
						</ol>
					</div>
					<?php }?>
					
               <?php }?>
					<?php if(!$adData){?>
                
					<!-- 20140813-订单-表单-地址-空数据-start -->
					<div class="order-address-empty" id="order-address-empty">
						您还没有收货地址，马上&nbsp;
						<a id="creatAddress" href="javascript:;" onclick="ec.order.myAddress.add()">
							添加
						</a>
						&nbsp;吧！
					</div>
					
               <?php }?>
					<div style="visibility: visible; width: 1348px; height: 1429px; z-index: 500;display: none;" class="ol_box_mask">
					</div>
					<!--点击 添加新地址，弹出添加地址div-->
					<div class="ol_box_4" id="myAddress-new-box" style="visibility: visible;display: none; position: fixed; top: 50%; left: 323.5px; z-index: 500;margin-top: -200px; width: 700px; height: 425px;">
						<div class="box-ct">
							<div class="box-header">
								<div class="box-tl">
								</div>
								<div class="box-tc">
									<div class="box-tc1">
									</div>
									<div class="box-tc2">
										<a href="javascript:;" onclick="return false;" title="关闭" class="box-close">
										</a>
										<span class="box-title">添加地址</span>
									</div>
								</div>
								<div class="box-tr">
								</div>
							</div>
							<table style="table-layout:fixed;" border="0" cellpadding="0" cellspacing="0" width="100%">
								<tbody>
									<tr>
										<td class="box-cl">
										</td>
										<td class="box-cc">
											<div style="height: auto;" class="box-content">
												<div id="order-address-add-area">
													<!--后盾js-->
													<link rel="stylesheet" type="text/css" href="<?php echo __PUBLIC__?>/Home/hdjs/hdjs.css"/>
													<script type="text/javascript" src="<?php echo __PUBLIC__?>/Home/hdjs/hdjs.min.js"></script>
													<script type="text/javascript">$(function() {
	$('#order-address-add-form').validate({
		uname: {
			rule: {
				required: true,
				china: true
			},
			error: {
				required: '收货人不能为空',
				china: '必须是中文',
			},
			success: '通过'
		},
		phone: {
			rule: {
				maxlen: 11,
				minlen: 11
			},
			error: {
				maxlen: '超过11位啦',
				minlen: '不能小于11位'
			},
			success: '通过'
		}
	})
})</script>
													<form id="order-address-add-form" method="post" action="<?php echo U('address')?>">
														<input name="user_app_uid" value="<?php echo $_SESSION['app_uid']?>" type="hidden">
														<!--													<input name="randomFlag" value="7707932ba710ea99b6ca759b4ff7cf6e" type="hidden">-->
														<div class="form-address-area">
															<div class="form-edit-area">
																<div class="form-edit-table">
																	<table border="0" cellpadding="0" cellspacing="0">
																		<tbody>
																			<tr>
																				<th>
																					<span class="required">*</span>
																					<label for="">收货人：</label>
																				</th>
																				<td>
																					<input validator="validator61449458462315" class="text vam span-200" name="uname" value="" type="text">
																					<span class="vam" id="consignee-msg">
																					</span>
																				</td>
																			</tr>
																			<tr>
																				<th class="vat" rowspan="2" style="text-align: left;">
																					<span class="required">*</span>
																					<label for="">收货地址：</label>
																				</th>
																				<td>
																					<script type="text/javascript" src="<?php echo __PUBLIC__?>/Home/js/area.js"></script>
																					<script type="text/javascript">$(function() {
	//初始化方法
	area.init('a');
	//修改的时候默认被选中效果
	area.selected('黑龙江', '哈尔滨', '道里区');
	//城市联动插件结束
	//点击事件--- 点击添加，div显示
	$('#creatAddress,#addAddress').click(function() {
			$('.ol_box_mask').show();
			$('#myAddress-new-box').show();
		})
		//点击关闭div事件
	$('.box-close,.box-cancel').click(function() {
		$('.ol_box_mask').hide();
		$('#myAddress-new-box').hide();
	})
})</script>
																					<div id="myAddress-add-region" style="float:left;">
																						<span class="ol_linkSelect ol_linkSelect_region">
																							<select name="address[]" id="a1">
																							</select>
																							<select name="address[]" id="a2">
																							</select>
																							<select name="address[]" id="a3">
																							</select>
																						</span>
																					</div>
																					<span id="myAddress-msg" class="vam">
																					</span>
																				</td>
																			</tr>
																			<tr>
																				<td>
																					<label for="input_label_2" class="textarea span-500" style="display: block; position: absolute; cursor: text; float: left; z-index: 2; color: rgb(153, 153, 153);">
																					</label>
																					<textarea style="z-index: 1;resize: none;" id="input_label_2" validator="validator71449458462316" name="address[]" class="textarea span-500" placeholder="详细地址"></textarea>																																										


																					<span class="vat" id="address-msg">
																					</span>
																				</td>
																			</tr>
																			<tr>
																				<th>
																					<label for="">邮编：</label>
																				</th>
																				<td>
																					<input validator="validator81449458462316" name="email" class="text vam span-100 ime-disabled" value="" maxlength="6" type="text">
																					<span class="vam" id="zipCode-msg">
																					</span>
																				</td>
																			</tr>
																			<tr>
																				<th>
																					<span class="required">*</span>
																					<label for="">手机号码：</label>
																				</th>
																				<td>
																					<div class="vam inline-block">
																						<input validator="validator91449458462317" class="text  span-100 ime-disabled" name="phone" value="" type="text">
																					</div>&nbsp;&nbsp;<label class="vam" for="">或固定电话：&nbsp;</label>
																					<div class="vam inline-block">
																						<label for="input_label_3" class="text  span-150 ime-disabled" style="display: block; position: absolute; cursor: text; float: left; z-index: 2; color: rgb(153, 153, 153);">
																						</label>
																						<input style="z-index: 1;" id="input_label_3" validator="validator101449458462317" name="tel_phone" value="" class="text  span-150 ime-disabled" type="text" placeholder="区号-主机-分机号">
																					</div>
																					<span class="vam" id="phone-msg">
																					</span>
																				</td>
																			</tr>
																		</tbody>
																	</table>
																</div>
															</div>
														</div>
														<div class="box-button">
															<input type="submit" value="确定"  class="box-ok" style="height: 37px;width: 120px;cursor: pointer;"/>
															<!--<a href="javascript:;" onclick="ec.order.myAddress.save(this)">
															<span></span>
															</a>-->
															<a class="box-cancel" href="javascript:;"
															<span>取消</span>
															</a>
															</div>
															<div class="box-form-tips">
															<span class=""></span>
															</div>
															</form>
															</div>
															</div>
															<div style="display: none;" class="box-button">
															<a class="box-ok" href="javascript:;"><span>确定</span></a>
															<a class="box-cancel" href="javascript:;"><span>取消</span></a>
															</div>
															</td>
															<td class="box-cr"></td>
															</tr>
															</tbody>
															</table>
															<div class="box-bottom">
															<div class="box-bl"></div>
															<div class="box-bc"></div>
															<div class="box-br"></div>
															</div>
															</div>
															</div>
															<!--点击 添加新地址，弹出添加地址div 结束-->
															<!-- 20140813-订单-表单-地址-空数据-end -->
															<!--<div id="address-more" class="hide">
															<a href="javascript:;" class="address-expand">更多地址<i></i></a>
															</div>-->
															<!--<input name="orderDistrict" id="order-district" type="hidden">-->
															</div>
															<!--发票信息-->
															<!--<div class="order-invoice">
															<h3 class="title">发票信息<em>（请谨慎选择发票抬头，订单出库后不能修改）</em></h3>
															<div class="order-invoice-list" id="order-invoice-area">
															<ul>
															个人
															<li>
															<div class="invoice-main">
															<input name="titleType" id="titleType-per" class="radio" value="1" checked=""  type="radio">
															<label for="titleType-per">个人</label>
															</div>
															</li>
															单位
															<li>
															<div class="invoice-main">
															<input name="titleType" id="titleType-com" class="radio" value="2" type="radio"><label for="titleType-com">单位</label>
														</div>
														<div class="invoice-sub">
															<label>
																<input style="width:21%;" id="invoiceTitle-com" placeholder="请输入单位名称，勿填无关信息" class="text vam"   type="text">
																<span style="display: none;" class="icon-error vam" id="companyError">请填写发票抬头</span>
															</label>
														</div>
														</li>
														</ul>
												</div>
												<p class="tips">
													<em>注意：</em>如果商品由第三方卖家销售，发票内容由其卖家决定，发票由卖家开具并寄出
												</p>
											</div>-->
						</div>
						<!--提交订单-->
						<div class="sc-area">
							<div class="dt-order-area">
								<!--商品列表-->
								<div class="order-pro-list">
									<div class="order-pro-title-area">
										<div class="h">
											以下商品由&nbsp;&nbsp;
											<b>华为商城</b>
											&nbsp;&nbsp;选择合作快递配送
										</div>
										<div class="b">
											<table border="0" cellpadding="0" cellspacing="0">
												<thead>
													<tr>
														<th class="tr-pro">
															商品
														</th>
														<th class="tr-price">
															单价（元）
														</th>
														<th class="tr-quantity">
															数量
														</th>
														<th class="tr-subtotal">
															小计（元）
														</th>
													</tr>
												</thead>
											</table>
										</div>
									</div>
									<!--循环的商品-->
									<div class="order-pro-area">
										<?php foreach ($data['goods'] as $data_k=>$data_v){?>
										<table border="0" cellpadding="0" cellspacing="0">
											<tbody>
												<tr>
													<td class="tr-pro">
														<ul class="pro-area-2">
															<li>
																<a target="_blank" href="">
																	<?php echo $data_v['name']?>
																</a>
															</li>
														</ul>
													</td>
													<!-- 预付订金商品的价格为空 -->
													<td class="tr-price">
														¥<?php echo $data_v['price']?>.00
													</td>
													<td class="tr-quantity">
														<?php echo $data_v['num']?>
													</td>
													<td rowspan="3" class="tr-subtotal">
														<p>
															<b>¥<?php echo $data_v['total']?>.00</b>
														</p>
													</td>
												</tr>
											</tbody>
										</table>
										<?php }?>
									</div>
								</div>
								<!--应付金额-->
								<div class="order-pro-total">
									<div class="fr">
										<!-- 20140630-订单-金额-start -->
										<div class="order-cost-area">
											<table border="0" cellpadding="0" cellspacing="0">
												<tbody>
													<tr>
														<td class="tal">
															商品总金额：
														</td>
														<td class="tar">
															&nbsp;¥&nbsp;
															<em id="order-cost-area" data-oldval=" 5998.00"><?php echo $data['total']?>.00</em>
														</td>
													</tr>
													<tr>
														<td class="tal">
															运费：
														</td>
														<td class="tar">
															&nbsp;¥&nbsp;
															<em id="order-deliveryCharge">0.00</em>
														</td>
													</tr>
													<!--<tr>
													<td class="tal">使用优惠券：</td>
													<td class="tar">-&nbsp;¥&nbsp;
													<em><span id="order-couponDiscount">0.00</span> </em>
													</td>
													</tr>
													<tr>
													<td class="tal">使用花瓣：</td>
													<td class="tar">-&nbsp;¥&nbsp;
													<em><span id="oreder-huaban-num">0.00</span> </em>
													</td>
													</tr>
													<tr>
													<td class="tal">商家活动：
													</td>
													<td class="tar">-&nbsp;¥&nbsp;<em>0.00</em>
													</td>
													</tr>-->
												</tbody>
											</table>
											<p class="order-cost-total">
												<span class="p-subtotal-price">
													应付金额：<b class="total">¥</b><b class="total" id="order-price" data-oldval="5998.00"><?php echo $data['total']?>.00</b>
												</span>
											</p>
										</div><!-- 20140630-订单-金额-end -->
									</div>
								</div>
							</div>
							<!--提交订单-->
							<div class="order-action-area tar">
								<span class="p-subtotal-price">应付总额：
									<b>¥<span class="vab" id="payableTotal"><?php echo $data['total']?>.00</span></b>
								</span>
								<span>
									<a href="javascript:;" class="button-style-1 button-submit-order" id="tijiaodingdan">
										提交订单
									</a>
									<script type="text/javascript">$(function() {
	$('.order-address-list').first().find('.address_radio').addClass('current');
	$('.order-address-list').first().find('.address-mark').css({
		'display': 'block'
	});
	$('.order-address-list').first().find('.radio').attr('checked', true);
	$('#order-address-mod').on('click', '.order-address-list', function() {
		var num = $(this).attr('kk');
		$(this).find('.address_radio').addClass('current').end().siblings('.order-address-list').find('.address_radio').removeClass('current');
		$(this).find('.address-mark').css({
			'display': 'block'
		}).end().siblings('.order-address-list').find('.address-mark').css({
			'display': 'none'
		});
		$(this).find('.radio').attr('checked', true);
	})
	$('#tijiaodingdan').click(function() {
		//								抓取被选中的radio的value值
		var val_payPlatform = $('input[name="myAddress"]:checked').val();
		//								alert(val_payPlatform);
		//								用户id
		var uid = {
			{
				$_SESSION['app_uid']
			}
		};
		if (val_payPlatform) {
			//								发送ajax
			//								alert(val_payPlatform);
			$.ajax({
				//									请求方式
				type: 'post',
				//									发送的数据
				data: {
					val: val_payPlatform,
					uid: uid
				},
				//									请求地址
				url: '{{U('
				addOrder ')}}',
				//									返回数据类型
				dataType: 'json',
				//									成功返回的数据
				success: function(phpData) {
					location.href = "index.php?m=Home&c=Order&a=successOrder&oid=" + phpData;
				}
			})
		}
	})
})</script>
								</span>
							</div>
						</div>
					</div>
					<!--底部，公共的-->
					<!--商城宣传-->
					<div class="slogan">
						<ul>
							<li style="width: 326px;">
								<i>
								</i>500强企业 品质保证
							</li>
							<li style="width: 327px;">
								<i>
								</i>7天退货 15天换货
							</li>
							<li>
								<i>
								</i>99元起免运费
							</li>
							<li style="float: right;">
								<i>
								</i>448家维修网点 全国联保
							</li>
						</ul>
					</div>
					<!--服务-->
					<!--底部友情链接-->
					<div class="footer">
						<div class="footer-warrant-area">
							<p>
								Copyright © 2011-2015  华为软件技术有限公司  版权所有  保留一切权利  苏B2-20130048号 | 苏ICP备09062682号-9
							</p>
							<p>
								<a href="">
									网络文化经营许可证苏网文[2012]0401-019号
								</a>
							</p>
							<p class="footer-warrant-img">
								<a href="">
									<img src="<?php echo __PUBLIC__?>/Home/images/certificate_01_112_40.png" alt="" />
								</a>
								<a href="">
									<img src="<?php echo __PUBLIC__?>/Home/images/certificate_02_112_40.png" alt="" />
								</a>
								<a href="">
									<img src="<?php echo __PUBLIC__?>/Home/images/certificate_03_112_40.png" alt="" />
								</a>
							</p>
						</div>
					</div>
					<!--返回顶部-->
					<script type="text/javascript" src="<?php echo __PUBLIC__?>/Home/js/BackTop.js"></script>
					<script type="text/javascript">$(function() {
	//插件使用
	$('.goTop').backTop({
		right: 20
	});
})</script>
					<div class="goTop">
					</div>
	</body>
</html>
